#pragma once

#ifndef OWNQTABWIDGET_H_
#define OWNQTABWIDGET_H_

#include <QtCore/QEvent>
#include <QtGui/QMouseEvent>
#include <QtGui/QTabWidget>
#include <QTGui/QToolButton>
#include <QtGui/QTabBar>
#include "DBTable.h"
#include "TableViewGadget.h"

namespace SQLDoc
{
	class OwnQTabWidget :
		public QTabWidget
	{
		Q_OBJECT

	public:
		OwnQTabWidget(QWidget *parent);
		bool eventFilter(QObject *o, QEvent *e);
		QWidget *addNewTab(DBTable *table);
		QWidget *startPage(void);
		void setStartPage(QWidget *widget);
		void showStartPage();

	private:
		QWidget *m_startPage;

	public slots:
		void closeTab_clicked(void);

	signals:
		void tabsChanged(int count) const;
	};
}

#endif
